package br.com.abril.prevision;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface PrevisionRepository 
				extends JpaRepository<Prevision, Long>
					  , JpaSpecificationExecutor<Prevision> {

	@Modifying
	@Query("update Prevision u set u.status = ?1 where u.wallet = ?2")
	int setProcessingStatusByWallet(String status, String wallet);
	
}

